import utils from "./utils";

const DEFAULT_CONTENT_TYPE = {
  'Content-Type': 'application/json;charset=utf-8'
};
const defaults = {
	method: 'GET',
	requestType: 'request',
	timeout: 0,
	headers: {
		common: {
			Accept: 'application/json, text/plain, */*'
		}
	},
  baseURL: '',
  auth: null, 
	authKey: 'Authorization',
	authURL: {
		inclusive: null,
		exclusive: null
	}
}
utils.forEach(['delete', 'get', 'head', 'options'], function methodsNoData(method){
  defaults.headers[method] = {}
})
utils.forEach(['post', 'put', 'patch'], function methodsWithData(method){
  defaults.headers[method] = {"Content-type": "application/x-www-form-urlencoded"}
})
module.exports = defaults;